package com.cloud.lan.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloud.lan.entity.model.dataobject.LanUserDO;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author xyqierkang@163.com
 * @since 2021-12-06
 */
@Mapper
public interface LanUserMapper extends BaseMapper<LanUserDO> {

    @Select("SELECT * FROM lan_user WHERE user_id= #{userId} AND is_deleted=0")
    LanUserDO getUserId(@Param("userId") long userId);

    @Select("SELECT * FROM lan_user WHERE user_phone= #{userPhone} AND is_deleted=0")
    LanUserDO getUserPhone(@Param("userPhone") String userPhone);
}
